#coding=UTF-8

file = Dir.new("./Cv_xml")

file.each do |path|
  fork do
    if path != "." and path != ".." and File.extname(path)== ".xml"
      sortie = "./Cv_html/#{path.reverse[4, path.size].reverse}.html"
      File::open(sortie, File::WRONLY | File::CREAT) do |fic_out|
        STDOUT.reopen(fic_out)
        system("xsltproc CV.xsl ./Cv_xml/#{path}")
      end
    end
  end
end
